package com.moli.iov.admin.model.vo.req;

import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * <p>
 * 命令
 * </p>
 *
 * @author zql
 * @since 2019/9/18 13:12
 */
@Data
public class CommandVo extends BaseVo implements Serializable {

  private static final long serialVersionUID = -8659008498900998299L;

  /**
   * 车架号
   */
  @NotEmpty(message = "车架号", groups = {General.class})
  private String vin;

  /**
   * 车架号集合 批量下发指令
   */
  private List<String> vins;

  /**
   * 命令集合 租赁模式\钥匙状态\动力控制
   */
  @NotNull(message = "命令不能为空", groups = {General.class})
  private List<Integer> operateTypes;

  /**
   * 原因说明
   */
  @NotEmpty(message = "原因说明不能为空", groups = {Control.class, Door.class, Window.class})
  private String memo;

  /**
   * 上传频率
   */
  @NotNull(message = "上报频率不能为空", groups = {Frequency.class})
  private Integer frequency;

  /**
   * ip
   */
  @NotEmpty(message = "平台域名或IP不能为空", groups = {IpAndPort.class})
  private String ip;

  /**
   * 端口
   */
  @NotNull(message = "平台端口不能为空", groups = {IpAndPort.class})
  private Integer port;

  /**
   * 升级url
   */
  @NotEmpty(message = "升级url不能为空", groups = Upgrade.class)
  private String upgradeUrl;

  /**
   * 版本
   */
  @NotEmpty(message = "版本号不能为空", groups = Upgrade.class)
  private String version;

  public interface Control{}

  public interface Door{}

  public interface Window{}

  public interface Frequency{}

  public interface IpAndPort{}

  public interface General{}

  public interface Upgrade{}

}
